home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / Sound / SPlayer / Socks5 / examples / multiple_server.example next >
Text File  |  1997-06-18  |  5KB  |  137 lines

  1. File Name: multiple_server.example 
  2.  
  3. 1. Example - Multiple socks5 Servers with socks5 Username/Password
  4.              authentication
  5.  
  6. # This example describes a socks5 environment on network 163.201.56., with:
  7. # - two socks5 servers: serverA:3000 and serverB:2000 using Username/Password
  8. #   Authentication
  9. # - one socks client, clientA using socks5 Username/Password authentication
  10. # This example assumes no special build option requirements.
  11. #
  12. # ClientA has two socks5 users: userA and userB
  13. #
  14. # userA and userB must use the socks5 serverA:3000 for all commands to 
  15. #   destination 163.201.56.12
  16. #
  17. # Both users use serverB:2000 for ping or traceroute commands to any 
  18. # destination on 163.201.56, except 163.201.56.12.
  19. #
  20. # Both users use serverA:3000 for any command to any destination, except
  21. # 163.201.56.12 on the 163.201.56 network.
  22. #
  23.  
  24.                                  ---------
  25.                                 | serverB |
  26.                                 |         | 
  27.                                  ---------
  28.                                      |
  29.     ---------                 ---------------         ----------
  30.    | clientA |               | 163.201.56.   |       | serverA  |
  31.    |         |---------------|  Network      |-------|          |
  32.     ---------                 ---------------         ----------
  33.    userA: socks5 user           |          | 
  34.    mary:  unix user             |          |_____
  35.                                 |                | 
  36.                            -------------       -------------    
  37.    userB: socks5 user     | Destination |     | Destination | 
  38.    sam:   unix user       | any host on |     |163.201.56.12|
  39.                           | 163.201.56. |     |             |
  40.                            -------------       -------------
  41.  
  42.  
  43. 2. Server Environment Variables
  44.  
  45. # You must tell the server where to find the configuration file. You can do so
  46. # in one of three ways:
  47. #  - Set the environment variable SOCKS5_CONFFILE
  48. #  - Include the socks5.conf file in the default directory, usually /etc
  49. #  - Build with the --with-srvconffile=path option
  50. # This example demonstrates using environment variables. The example path is 
  51. # arbitrary.
  52.  
  53. #serverA:3000
  54.  
  55. setenv SOCKS5_CONFFILE /socksdir/run/socks5.conf
  56. setenv SOCKS5_PWDFILE  /socksdir/run/socks5.passwd
  57.  
  58. #serverB:2000
  59.  
  60. setenv SOCKS5_CONFFILE /socksdir/run/socks5.conf
  61. setenv SOCKS5_PWDFILE  /socksdir/run/socks5.passwd
  62.  
  63. 3. Server Configuration File socks5.conf
  64.  
  65. # These are the socks5.conf files. The socks5.conf file must be in the 
  66. # directory specified in the SOCKS5_CONFFILE environment variable, or the 
  67. # default directory, usually /etc
  68. # In this example, the socks5.conf file is the same for both 
  69. # servers. The servers can share the configuration file, if both servers can 
  70. # access it.
  71.  
  72. #serverA:3000   filename  /socksdir/run/socks5.conf
  73. auth 163.201.56. - u
  74. permit u - 163.201.56. 163.201.56. - - userA,userB
  75.  
  76. #serverB:2000   filename  /socksdir/run/socks5.conf
  77. auth 163.201.56. - u
  78. permit u - 163.201.56. 163.201.56. - - userA,userB
  79.  
  80. 4. Server socks5 Password File 
  81.  
  82. # This is the socks5 Username/Password file. It should be in the directory
  83. # specified in the SOCKS5_PWDFILE environment variable, or the default 
  84. # directory, usually /etc
  85. #
  86. # To add more users, place each user on a new line with username and 
  87. # password separated by white space.
  88.  
  89. userA passA
  90. userB passB
  91.  
  92. 5. Runtime mode
  93.  
  94. # To start the socks5 daemons in standalone mode on serverA on bindport 3000,
  95. # at the command prompt, type:
  96. #          ./socks5 -b 3000
  97. #
  98. # To start the socks5 daemons in standalone mode on serverB on bindport 2000,
  99. # at the command prompt, type:
  100. #          ./socks5 -b 2000
  101.  
  102. 6. Client Configuration File libsocks5.conf
  103.  
  104. # When the server and client are on the same network, it is most efficient to 
  105. # run the client without a configuration file. We include the configuration
  106. # file in this example to show how to control which server the client uses in
  107. # a multiple socks5 server environment.
  108. #
  109. # This is the libsocks5.conf configuration file for clientA. It should be in the
  110. # directory specified in the build, or in the default directory, usually /etc
  111. #
  112. # The order of proxy lines is crucial to achieve the desired results. In this
  113. # example, if the third line were first, any command to destination 163.201.56
  114. # would use serverA:3000.
  115.  
  116. socks5 - 163.201.56.12 - mary,sam serverA:3000 #mary and sam are unix user ids 
  117. socks5 p,t 163.201.56. - mary,sam serverB:2000 #mary and sam are unix user ids 
  118. socks5 - 163.201.56. -  mary,sam serverA:3000  #mary and sam are unix user ids
  119.  
  120. 7. Client Environment Variables
  121.  
  122. # Set the environment variables for the socks5 user userA. Setting the 
  123. # SOCKS5_NONETMASKCHECK environment variable forces the client to read the
  124. # configuration file.
  125. # At the command prompt, type:
  126.  
  127. setenv SOCKS5_NONETMASKCHECK 
  128. setenv SOCKS5_USER userA  
  129. setenv SOCKS5_PASSWD passA
  130.  
  131. #Set the environment variables for the socks5 user userB
  132. #At the command prompt, type:
  133.  
  134. setenv SOCKS5_NONETMASKCHECK
  135. setenv SOCKS5_USER userB  
  136. setenv SOCKS5_PASSWD passB
  137.